﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="Banner.aspx.cs"
    Inherits="Manager_Banner_Banner" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="border-collapse: collapse" class="tbl_Comon-Search" bordercolor="#407db3"
        cellspacing="2" cellpadding="2" width="100%" border="1">
        <tbody>
            <tr>
                <td style="width: 84px" valign="top" align="center" colspan="1" rowspan="1">
                    <asp:Button ID="btnSearch" OnClick="btnSearch_Click" runat="server" Text="Tìm kiếm"
                        CssClass="cssButton"></asp:Button></td>
                <td style="width: 63px" class="td_Title" nowrap>
                    <asp:Label ID="Label3" runat="server" Text="Link" CssClass="lbl_Common-Search"></asp:Label></td>
                <td class="td_Control" nowrap>
                    <asp:TextBox ID="txtTenTheLoai" runat="server" Width="98%"></asp:TextBox></td>
            </tr>
            <tr>
                <td valign="top" align="left" colspan="5" rowspan="1">
                    <asp:Button ID="btnAdd_Catalogue" OnClick="btnAdd_Catalogue_Click" runat="server"
                        Text="Thêm mới" CssClass="cssButton"></asp:Button></td>
            </tr>
        </tbody>
    </table>
    <asp:GridView ID="grv_RSS" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="ID" Width="100%" CellPadding="2" BorderColor="#407db3" PageSize="20"
        OnRowDataBound="grv_RSS_RowDataBound" OnRowCreated="grv_RSS_RowCreated" OnRowDeleting="grv_RSS_RowDeleting">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <img id='imgedit' alt="Edit" runat="server" border="0" onclick="OpenProductDetail(this)"
                        idimg='<%# Eval("ID") %>' src="../../Images/Icon/cmdEdit.gif" style="cursor: pointer" />
                </ItemTemplate>
                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" Wrap="False" />
                <HeaderStyle CssClass="cssBorderGrv" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="lblDelete" runat="server" CommandName="delete" Text="<img src=../../Images/Icon/cmdDelete.gif border=0 alt=Delete > "></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="5px" />
                <HeaderStyle CssClass="cssBorderGrv" />
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    Title
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="80%" />
                <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    File
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Image ID="imgProductStall" runat="server" Width="100px" Height="50px" />
                </ItemTemplate>
                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="center" Width="10%" Wrap="false" />
                <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Image ID="imgSelectRSS" ImageUrl="../../Images/Icon/cancel_icon.gif" runat="server" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBox ID="chkChooseRss" runat="server" />
                </EditItemTemplate>
                <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="3%" />
                <HeaderStyle CssClass="cssBorderGrv" />
            </asp:TemplateField>
        </Columns>
        <RowStyle CssClass="gvRowStyle" />
        <AlternatingRowStyle CssClass="gvAlternatingRowStyle" />
        <HeaderStyle CssClass="gvHeader" />
    </asp:GridView>

    <script language="javascript" type="text/javascript">
function OpenProductDetail(obj)
{
   		    
	    var ID=obj.getAttribute("IDimg");
	    var CodeID='<%= Request.QueryString["CodeID"]%>';
	    window.location.href="AddBanner.aspx?ID="+ID+ "&CodeID="+CodeID;
	    

}

    </script>

</asp:Content>
